home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / mac / ch09 / 09fig02.wrl < prev    next >
Text File  |  1996-09-23  |  730b  |  34 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright 1997 By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Rotating Cube
  8.         DEF Cube Transform {
  9.             children Shape {
  10.                 appearance Appearance {
  11.                     material Material { }
  12.                 }
  13.                 geometry Box { }
  14.             }
  15.         },
  16.     # Sensor
  17.         DEF Touch TouchSensor { },
  18.     # Animation clock
  19.         DEF Clock TimeSensor { cycleInterval 4.0 },
  20.     # Animation path
  21.         DEF CubePath OrientationInterpolator {
  22.             key [ 0.0, 0.50, 1.0 ]
  23.             keyValue [
  24.                 0.0 1.0 0.0  0.0,
  25.                 0.0 1.0 0.0  3.14,
  26.                 0.0 1.0 0.0  6.28
  27.             ]
  28.         }
  29.     ]
  30. }
  31. ROUTE Touch.touchTime        TO Clock.set_startTime
  32. ROUTE Clock.fraction_changed TO CubePath.set_fraction
  33. ROUTE CubePath.value_changed TO Cube.set_rotation
  34.